//
//  DataOfSearchResultModel.m
//  __PRODUCTNAME__
//
//  Created by li cheng on 16/09/14
//  Copyright (c) Gollum. All rights reserved.
//

#import "DataOfSearchResultModel.h"
#import "ArticleOfDataSearchResultModel.h"

@implementation DataOfSearchResultModel

+ (NSDictionary *)objectClassInArray{
    return @{@"article" : [ArticleOfDataSearchResultModel class]};
}

- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    if ([key isEqualToString:@"article"]) {
        NSMutableArray<ArticleOfDataSearchResultModel *> *mArrayOfArticleOfDataSearchResultModel = [NSMutableArray array];
        for (NSDictionary *dic in value) {
            ArticleOfDataSearchResultModel *articleOfDataSearchResultModel = [ArticleOfDataSearchResultModel modelDic:dic];
            [mArrayOfArticleOfDataSearchResultModel addObject:articleOfDataSearchResultModel];
        }
        _article = mArrayOfArticleOfDataSearchResultModel;
    }
}
@end
